#include "../../lua/lua.hpp"
#include "../../Resource/Resource.h"

void lg_init();
void lg_set_window(void* window);
void lg_exit();
//void lg_run(const char* file_name);

void lg_open_res(const char* res_name);
void lg_res_dir(unsigned int id, void* p, list_proc proc);
item_info* lg_res_find(const char* name);
item_info* lg_res_add_child_dir(item_info* parent, const char* name);
item_info* lg_res_add_child_file(item_info* parent, const char* file_name, bool& created);
item_info* lg_res_add_child_richtext(item_info* parent, const char* node_name, unsigned int size);

void* lg_res_get_data(item_info* item, unsigned int& size);
void lg_res_remove_data(item_info* item, void* data);
void lg_res_save_data(item_info* item, const char* data,  unsigned int size);

lua_State* lg_getL();